package com.student.grade.dto;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 成绩DTO类，包含关联的学生和课程信息
 * 
 * @author student
 * @date 2025
 */
public class GradeDTO {
    
    private Long gradeId;
    private String studentId;
    private String studentName;
    private String courseId;
    private String courseCode;
    private String courseName;
    private String teacherId;
    private BigDecimal score;
    private String gradeType;
    private String semester;
    private LocalDateTime inputTime;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    
    // 构造函数
    public GradeDTO() {}
    
    public GradeDTO(Long gradeId, String studentId, String studentName, String courseId, 
                   String courseCode, String courseName, String teacherId, BigDecimal score, 
                   String gradeType, String semester, LocalDateTime inputTime, 
                   LocalDateTime createTime, LocalDateTime updateTime) {
        this.gradeId = gradeId;
        this.studentId = studentId;
        this.studentName = studentName;
        this.courseId = courseId;
        this.courseCode = courseCode;
        this.courseName = courseName;
        this.teacherId = teacherId;
        this.score = score;
        this.gradeType = gradeType;
        this.semester = semester;
        this.inputTime = inputTime;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
    
    // 用于原生SQL查询的构造函数（参数顺序必须与SQL SELECT顺序一致）
    public GradeDTO(Long gradeId, String studentId, String studentName, String courseId, 
                   String courseCode, String courseName, String teacherId, BigDecimal score, 
                   String gradeType, String semester, LocalDateTime inputTime, 
                   LocalDateTime createTime, LocalDateTime updateTime, Object... additional) {
        this.gradeId = gradeId;
        this.studentId = studentId;
        this.studentName = studentName;
        this.courseId = courseId;
        this.courseCode = courseCode;
        this.courseName = courseName;
        this.teacherId = teacherId;
        this.score = score;
        this.gradeType = gradeType;
        this.semester = semester;
        this.inputTime = inputTime;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
    
    // Getter和Setter方法
    public Long getGradeId() { return gradeId; }
    public void setGradeId(Long gradeId) { this.gradeId = gradeId; }
    
    public String getStudentId() { return studentId; }
    public void setStudentId(String studentId) { this.studentId = studentId; }
    
    public String getStudentName() { return studentName; }
    public void setStudentName(String studentName) { this.studentName = studentName; }
    
    public String getCourseId() { return courseId; }
    public void setCourseId(String courseId) { this.courseId = courseId; }
    
    public String getCourseCode() { return courseCode; }
    public void setCourseCode(String courseCode) { this.courseCode = courseCode; }
    
    public String getCourseName() { return courseName; }
    public void setCourseName(String courseName) { this.courseName = courseName; }
    
    public String getTeacherId() { return teacherId; }
    public void setTeacherId(String teacherId) { this.teacherId = teacherId; }
    
    public BigDecimal getScore() { return score; }
    public void setScore(BigDecimal score) { this.score = score; }
    
    public String getGradeType() { return gradeType; }
    public void setGradeType(String gradeType) { this.gradeType = gradeType; }
    
    public String getSemester() { return semester; }
    public void setSemester(String semester) { this.semester = semester; }
    
    public LocalDateTime getInputTime() { return inputTime; }
    public void setInputTime(LocalDateTime inputTime) { this.inputTime = inputTime; }
    
    public LocalDateTime getCreateTime() { return createTime; }
    public void setCreateTime(LocalDateTime createTime) { this.createTime = createTime; }
    
    public LocalDateTime getUpdateTime() { return updateTime; }
    public void setUpdateTime(LocalDateTime updateTime) { this.updateTime = updateTime; }
}
